// 封装轮播图相关业务代码
// 获取轮播图
import { getBannerApi } from '@/api/home'

import { onMounted, ref } from 'vue'

export function useBanner() {
  const getBannerList = ref([])
  const getBanner = async () => {
    const res = await getBannerApi({ distributionSite: '2' })
    getBannerList.value = res.data.result
    // console.log(res)
  }
  onMounted(() => getBanner())
  return {
    getBannerList,
    getBanner
  }
}
